package softswitch.model;


import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "package", schema = "softswitch")
public class Package{
	
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE)
	int id;
	
	@Temporal(TemporalType.TIMESTAMP)
	private Date creationdate;	
	@Temporal(TemporalType.TIMESTAMP)
	private Date activationdate;
	private Boolean aditionalminutes;
	private String aditionalrate;
	
	
	@ManyToOne
	private Circuit circuit;
	
	@ManyToOne
	private Offer offer;
	
	@OneToMany(cascade=CascadeType.ALL, mappedBy="packag")
	private List<PackageSummary> PackageSummary;
	

	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Date getCreationdate() {
		return creationdate;
	}
	public void setCreationdate(Date creationdate) {
		this.creationdate = creationdate;
	}
	public Date getActivationdate() {
		return activationdate;
	}
	public void setActivationdate(Date activationdate) {
		this.activationdate = activationdate;
	}	
	public Circuit getCircuit() {
		return circuit;
	}
	public void setCircuit(Circuit circuit) {
		this.circuit = circuit;
	}
	public Offer getOffer() {
		return offer;
	}
	public void setOffer(Offer offer) {
		this.offer = offer;
	}	
	public String getAditionalrate() {
		return aditionalrate;
	}
	public void setAditionalrate(String aditionalrate) {
		this.aditionalrate = aditionalrate;
	}
	public Boolean getAditionalminutes() {
		return aditionalminutes;
	}
	public void setAditionalminutes(Boolean aditionalminutes) {
		this.aditionalminutes = aditionalminutes;
	}
	
	
}
